/*
 * Copyright (c) 2018-2999 湖南洛云网络科技有限公司 All rights reserved.
 *
 * https://www.gz-yami.com/
 *
 */

package com.yami.shop.platform.controller;

import com.yami.shop.bean.enums.RemindType;
import com.yami.shop.bean.model.NotifyLog;

import javax.validation.Valid;

import com.yami.shop.bean.param.OrderParam;
import com.yami.shop.security.platform.util.SecurityUtils;
import com.yami.shop.service.NotifyLogService;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import lombok.AllArgsConstructor;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yami.shop.common.util.PageParam;
import com.baomidou.mybatisplus.core.metadata.IPage;

import java.util.Objects;


/**
 *
 *
 * @author lhd
 * @date 2020-08-10 15:20:53
 */
@RestController
@AllArgsConstructor
@RequestMapping("/platform/notifyLog" )
public class NotifyLogController {

    private final NotifyLogService notifyLogService;

    /**
     * 分页查询
     * @param page 分页对象
     * @param notifyLog
     * @return 分页数据
     */
    @GetMapping("/page" )
    @PreAuthorize("@pms.hasPermission('platform:notifyLog:list')" )
    public ResponseEntity<IPage<NotifyLog>> getNotifyLogPage(PageParam<NotifyLog> page, NotifyLog notifyLog, OrderParam orderParam) {
        return ResponseEntity.ok(notifyLogService.pageByParam(page,orderParam));
    }


}
